<template>
	<view>
		<view class="classify">
			<view @click="on_view(index)" class="goods-li50" v-for="(item,index) in list" :key="index">
				<view class="f30 cff" style="position: absolute;z-index: 1;margin-top: 5px;margin-left: 5px;">
					{{item.name}}
				</view>
				<image class="b_y" style="width: 100%;height: 350rpx;" :src="item.img|getImg">
				</image>
			</view>
		</view>

		<tabbar class="">

		</tabbar>
	</view>
</template>

<script>
	 
	export default {
		components: {

		 
		},

		data() {
			return {
				page: 1,
				list: [],
				url: ''
			}
		},
		onLoad() {
			var pages = getCurrentPages()
			let currentRoute = pages[pages.length - 1].route;
			this.api_path = currentRoute.match(/pages\/(\S*)\//)[1];
			this.init()
		},
		methods: {
			on_view(index) {
				var name = this.list[index]['name'];
				uni.navigateTo({
					url: '/pages/banmichaoqiangbizhi/list_tags?name=' + name
				})

			},
			init() {

				let requestParams = {
					page: this.page
				};
				this.Http.post('/plugin.php/banmichaoqiangbizhi/api/Index/shop_tags',requestParams).then(ret => {
			
					if (ret.status == 200) {
						 
						this.list = ret.data.list.data

					}
				})
			},
		}
	}
</script>

<style>
	page {
		background-color: #fff;
	}
.classify {
		display: flex;
		justify-content: flex-start;
		flex-wrap: wrap; 
	}
	.goods-li50 {
		flex: 0 0 48%;
		font-size: 24upx;
		margin: 5rpx;

	}
</style>